<?php include_once 'header-inc.php'; ?>

<div class="main_w cbg">
    <table class="body_w noborder" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td class="atop left_w">
                <div class="nbox">
                    <div class="title">客户<span>留言</span></div>
                    <div class="note">
                        <ul class="nav">
                            <li><a href="<?php echo url('guestbook'); ?>">留言列表</a></li>
                            <li><a href="<?php echo url('guestbook', 'write'); ?>">填写留言</a></li>
                        </ul>
                    </div>
                </div>
            </td>
            <td class="atop right_w">
                 <div class="nbox ml">
                    <div class="postion">&middot; 首页 &gt; 客户留言 &gt; 留言列表</div>
                    <div class="content">
                        <?php if($data['rows']): ?>
                        <ul class="gb-list">
                        <?php foreach($data['rows'] as $row): ?>
                            <li class="comment">
                                <div class="author">
                                    <div class="pic">
                                        <img src="<?php echo getAvatars(getOption($row['options'], 'email')); ?>" width="50" height="50" alt="" />
                                    </div>
                                    <div class="name"><?php echo h(getOption($row['options'], 'username')); ?></div>
                                </div>
                                <div class="info">
                                    <div class="date"><?php echo date('Y年m月d日 H:i', $row['created']); ?></div>
                                    <div class="memo">
                                        <p><?php echo $row['content']; ?></p>
                                    </div>
                                    <?php if($row['reply']): ?>
                                    <div class="reply"><span class="b">管理员回复:</span> <?php echo h($row['reply']); ?></div>
                                    <?php endif; ?>
                                </div>
                                <div class="fixed"></div>
                            </li>
                        <?php endforeach; ?>
                        </ul>
                        <?php else: ?>
                        <p class="tc">暂无留言</p>
                        <?php endif; ?>
                    </div>
                    <?php $this->load_module( 'pagenav', 'pagenav', array(FLEA::getAppInf( 'controllerAccessor' )=>$_GET[FLEA::getAppInf( 'controllerAccessor' )], 'pager'=>$data['pager'], 'prevLabel'=>'上一页', 'nextLabel'=>'下一页') ); ?>
                    <div class="clear"></div>
              </div>
            </td>
        </tr>
    </table>
    <div class="sfbg"></div>
</div>
<?php include_once 'footer-inc.php'; ?>
